<div class="WindowList">
<form method="post" class="form-horizontal checkoutform " novalidate action="{:U('update', array('id' => $info['id']))}">
      <div class="form-group">
          <label class="pull-left">项目名称</label>
          <input value="{$info['title']}" name="title" placeholder="项目名称" class="form-control" type="text"/>
      </div>
      <div class="form-group text-input">
          <label class="pull-left">选择表格</label>
           <assign name="temp['id']" value="$info['id']" />
          <html:listselect class="btn btn-sm btn-success pull-right" name="form" selected="info['form_id']" multiple="1" url="{:U('Taskform/select',$temp)}" title="选择表格" />
      </div>
      <div class="form-group">
      	<label>审批</label>
        <?php dump($missionList); ?>
      	<volist name="missionList" id="vo">
    		<div class='form-box'>
            	<span>{$vo['title']}</span>
            	<a class='button pull-right' href='javascript:void(0);' onclick='mission_{$vo['state']==-1?'send':'cancel'}({$vo['id']}, this);'>{$vo['state']==-1?'递交':'取消'}</a>
            </div>
        </volist>
      </div>
      <div class="form-group">
          <label>参与人员</label>
     	  <html:listselect class="btn btn-sm btn-success plusSign" name="member" selected="info['member_id']" multiple="0" url="{:U('Member/select')}" title="+"/>
      </div>
      <hr/>
      <div class="form-group">
          <label>执行规则</label>
     		<html:listselect class="btn btn-sm btn-success pull-right" name="rule" selected="info['rule_id']" multiple="1" url="{:U('Integral_rule/select')}" title="+"/>
      </div>
      <!--<div class="form-group">
          <label class="pull-left">执行人员</label>
     	  <html:listselect class="btn btn-sm btn-success pull-right" name="executor" selected="info['executor_id']" multiple="0" url="{:U('Member/select')}" title="选择执行人"/>
      </div>-->
      <hr/>
      <div class="form-group">
          <label>审核人员</label>
     	  <html:listselect class="btn btn-sm btn-success plusSign" name="reviewer" selected="info['reviewer_id']" multiple="0" url="{:U('Member/select')}" title="+" id="reviewer_id" />
      </div>
      <hr/>
      <div class="form-group">
          <label>跟进人员</label>
     	  <html:listselect class="btn btn-sm btn-success plusSign" name="follower" selected="info['follower_id']" multiple="0" url="{:U('Member/select')}" title="+" id="follower_id" />
      </div>
      <div class="form-group"> 
          <label class="pull-left">循环状态</label>
          <select class="form-control" name="loop_id">
            <option value="1">循环</option>
            <option value="0">只执行一次</option>
          </select>
      </div>
      <div class="form-group">
        <label>执行时间</label>
        <div class="input-group date datepicker" data-date-autoclose="true" data-date-format="dd-mm-yyyy">
          <input class="form-control" value="{:date('d/m/Y',$info['starttime'])}" type="text" name="starttime" placeholder="请选择执行日期">
          <span class="input-group-addon"><i class="icon-calendar"></i></span>
        </div>
        <div class="input-group bootstrap-timepicker">
          <input name="endtime"  value="{:date('H:i:s',$info['starttime'])}" class="form-control" id="timepicker-modal2" placeholder="请选择执行时间" type="text">
          	<span class="input-group-addon"><i class="icon-time"></i></span>
           </input>
        </div>
      </div>
      <div class="form-group">
          <label class="pull-left">积分数量</label>
          <input class="form-control" value="{$info['integralNum']}" name="number" placeholder="请输入数量" type="number">
      </div>
      <div class="form-group"> 
          <label>任务内容</label>
          <textarea class="form-control" rows="3" placeholder="请输入任务内容" name="remark">{$info['remark']}</textarea>
      </div>
</form>
<style>
	a.hidden{ display:block !important; visibility:visible !important;}
	a.plusSign{float: left;width: 50px;height: 50px;line-height: 35px;font-size: 30px; font-weight:bold; margin-left:10px;}
	.memberDataBox,.reviewerDataBox,.followerDataBox{ float:left; display:inline-block;}
</style>
<script>
function mission_send(id,e){
	if(!confirm('确定递交吗？')){
		return false;
	}
	hideLayer();
	$.post('{:U('Mission/send')}', {id:id}, function(data){
		if(data.status == 1){
			updateWindowList();
		}else{
			alert(data.info);
		}
	}, 'json');
}

function mission_cancel(id,e){
	if(!confirm('确定取消吗？')){
		return false;
	}
	hideLayer();
	$.post('{:U('Mission/cancel')}', {id:id}, function(data){
		if(data.status == 1){
			updateWindowList();
		}else{
			alert(data.info);
		}
	}, 'json');
}
</script>
</div>